<%@ page contentType="text/html;charset=UTF-8" %>

<html>
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
    <title>Sample title</title>
    <meta name="layout" content="main" />
  </head>
  <body>
      <div id="pageBody">
          <div id="fb-root"></div>
          <script>
              (function(d, s, id) {
              var js, fjs = d.getElementsByTagName(s)[0];
              if (d.getElementById(id)) return;
              js = d.createElement(s); js.id = id;
              js.src = "//connect.facebook.net/en_US/all.js#xfbml=1";
              fjs.parentNode.insertBefore(js, fjs);
            }(document, 'script', 'facebook-jssdk'));
          </script>
          <div class="fb-like" data-href="http://localhost:8088/WineXpressClient/product/wine"  data-send="false" data-width="450" data-show-faces="true"></div>
          <br/>
          <br/>

          <h1>View Wine Products</h1>

          ${flash.message}

          <br/><br/>
          <table>
              <tr>
                <th></th>
                <th>Product Type</th>
                <th>Product Name</th>
                <th>Description</th>

              </tr>

              <g:each in="${products}" var="instance" status="s">

                <tr>
                  <input type="hidden" name="id" value="${instance.id}" />
                  <td><img src="../${instance.imageUrl}" alt="${instance.productName} Image" height="75px"/></td>
                  <td>${instance.productTypeName}</td>
                  <td><a href="http://localhost:8088/WineXpressClient/retrieveProductDetail?id=${instance.id}"/>${instance.productName}</a></td>
                  <td>${instance.description}</td>
                  <td>

                  </td>
<!--                  <td><a href="http://localhost:8088/WineXpressClient/addCart?id=${instance.id}"/>Add to Cart</a></td>-->
                  
                </tr>

              </g:each>
          </table>
          
      </div>
  </body>
</html>